package autowire;

public class TextEditer {
    private TextChecker textChecker;
    private String name;

    public TextEditer(TextChecker textChecker, String name) {
        this.textChecker = textChecker;
        this.name = name;
        System.out.println("Constructor of TextEditer");
    }

    public void setTextChecker(TextChecker textChecker) {
        this.textChecker = textChecker;
        System.out.println("by Setting");
    }

    public String getName() {
        System.out.println(name);
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void check() {
        textChecker.check();
    }
}
